package com.cjjd.c.feature.mine.certify;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.cjjd.c.R;
import com.cjjd.c.base.ActionBarFragment;
import com.cjjd.c.utils.FragmentUtil;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ----------------------------------
 * Created by xyd on 2017/8/14.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class PersonalFragment extends ActionBarFragment implements View.OnTouchListener {
    @Override
    public Object getTitleString() {
        return "身份认证";
    }

    @Override
    public int getContentView() {
        return R.layout.fragment_certify_personal;
    }


    @Override
    public void initRightButton(Button rightButton) {
        super.initRightButton(rightButton);
        rightButton.setVisibility(View.VISIBLE);
        rightButton.setText("完成");
        rightButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                FragmentUtil.replaceWithAddToBack(mContext, new CompleteCertifyFragment(), R.id.activity_body);
            }
        });
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        rootView.setOnTouchListener(this);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.iv_upload_positive, R.id.iv_upload_nagetive})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_upload_positive:
                break;
            case R.id.iv_upload_nagetive:
                break;
        }
    }

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        return true;
    }
}
